from pythonds.graphs import Vertex, Graph

g = Graph()
for i in range(6):
    g.add_vertex(i)

g.add_edge(0, 1, 5)
g.add_edge(0, 5, 2)
g.add_edge(1, 2, 4)
g.add_edge(2, 3, 9)
g.add_edge(3, 4, 7)
g.add_edge(3, 5, 3)
g.add_edge(4, 0, 1)
g.add_edge(5, 4, 8)
g.add_edge(5, 2, 1)

print(g.get_vertex(3))

for v in g:
    for w in v:
        print("(%s, %s)" % (v.get_id(), w.get_id()))
